package com.ap.autobase.repository.impl;

import org.hibernate.Criteria;
import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.ap.autobase.domain.Person;
import com.ap.autobase.repository.PersonDao;

@Repository
@Transactional
public class PersonDaoImpl extends GenericDaoImpl<Person, Integer> implements PersonDao {


	public Person getPersonById(Integer personId) {
		Criteria cr = getSession().createCriteria(Person.class,"users").add(Restrictions.eq("id", personId));
		return (Person) cr.uniqueResult();
	}

	
	

}
